print operation: let subclasses use a custom paginate
authorPaolo Borelli <pborelli@gnome.org>
Mon, 17 Aug 2015 16:31:15 +0000 (18:31 +0200)
committerPaolo Borelli <pborelli@gnome.org>
Tue, 18 Aug 2015 13:14:42 +0000 (15:14 +0200)
commit9f9c5ca49ada3e9345a48fd8d642883c0f7339fb
treed490b993170c9876d60430a964677ced205e02b5
parent31efc4097e51c1615d101d20b9ea75643dfb0558
print operation: let subclasses use a custom paginate

GtkPrintOperation was emitting paginate only if a signal was
connected, this meant that subclassing and overriding the
paginate vfunc lead to the unexpected result that paginate did
not run.
Instead we always emit the signal and use a custom accumulator:
if there is a signal we just run that and avoid the default
handler, otherwise we run the default handler which can be the
one by the subclass or the default handler that just skips
pagination.

Patch by Yevgen Muntyan, fixes #345345
gtk/gtkprintoperation.c